package com.cyj.mongodbcomment.cyj.mapper;

import com.cyj.mongodbcomment.cyj.pojo.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface CommentMapper extends MongoRepository<Comment,String> {
    List<Comment> findByArticleid(String articleid);

    //根据父id，查询子评论的分页列表
    Page<Comment> findByParentid(String parentid, Pageable pageable);
}
